package org.jeecg.modules.basic.worker.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.basic.exitstock.entity.LwgyMaterialExitstock;
import org.jeecg.modules.basic.exitstock.mapper.LwgyMaterialExitstockMapper;
import org.jeecg.modules.basic.exitstock.service.ILwgyMaterialExitstockService;
import org.jeecg.modules.basic.plan.entity.LwgyMaterialPlanGoods;
import org.jeecg.modules.basic.plan.entity.LwgyMaterialPlanapplication;
import org.jeecg.modules.basic.plan.entity.LwgyMaterialPlanapplications;
import org.jeecg.modules.basic.plan.mapper.LwgyMaterialPlanGoodsMapper;
import org.jeecg.modules.basic.plan.mapper.LwgyMaterialPlanapplicationMapper;
import org.jeecg.modules.basic.plan.service.ILwgyMaterialPlanapplicationService;
import org.jeecg.modules.basic.storages.mapper.LwgyStoragesNumMapper;
import org.jeecg.modules.basic.worker.entity.LwgyMaterialWorker;
import org.jeecg.modules.basic.worker.mapper.LwgyMaterialWorkerMapper;
import org.jeecg.modules.basic.worker.service.ILwgyMaterialWorkerService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import javax.annotation.Resource;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 物料管理申请表
 * @Author: jeecg-boot
 * @Date:   2021-04-06
 * @Version: V1.0
 */
@Service
public class LwgyMaterialWorkerServiceImpl extends ServiceImpl<LwgyMaterialWorkerMapper, LwgyMaterialWorker> implements ILwgyMaterialWorkerService {
    @Resource
    private LwgyMaterialWorkerMapper lwgyMaterialWorkerMapper;

    @Override
    public IPage<LwgyMaterialWorker> queryPageCustomers(Page<LwgyMaterialWorker> page, QueryWrapper<LwgyMaterialWorker> queryWrapper, String id) {
        return page.setRecords(lwgyMaterialWorkerMapper.queryPageListCustoms(page,queryWrapper,id));
    }

    @Override
    public List<LwgyMaterialWorker> queryPageList(String goodsId) {
        return lwgyMaterialWorkerMapper.queryList(goodsId);
    }

    @Override
    public List<LwgyMaterialWorker> queryPageLists(String goodsId) {
        return lwgyMaterialWorkerMapper.queryLists(goodsId);
    }

    @Override
    public IPage<LwgyMaterialWorker> queryPageCustomer(Page<LwgyMaterialWorker> page, QueryWrapper<LwgyMaterialWorker> queryWrapper) {
       /* queryWrapper.isNotNull("mp.id");
        queryWrapper.orderByDesc("writerTime");*/
        return page.setRecords(lwgyMaterialWorkerMapper.queryPageListCustom(page,queryWrapper));
    }

    @Override
    public IPage<LwgyMaterialWorker> queryPageGoCustomer(Page<LwgyMaterialWorker> page, QueryWrapper<LwgyMaterialWorker> queryWrapper) {
        return page.setRecords(lwgyMaterialWorkerMapper.queryPageListGoCustom(page,queryWrapper));
    }
}
